3.3037 \(\int (a+b x)^{-n} (c+d x) (e+f x)^{-1+n} \, dx\)

Optimal. Leaf size=151 \[ \frac{(a+b x)^{-n} (e+f x)^{n+1} \left (-\frac{f (a+b x)}{b e-a f}\right )^n (b (c f-d e (1-n))-a d f n) \, _2F_1\left (n,n+1;n+2;\frac{b (e+f x)}{b e-a f}\right )}{f^2 n (n+1) (b e-a f)}+\frac{(a+b x)^{1-n} (d e-c f) (e+f x)^n}{f n (b e-a f)} \]

[Out]

((d*e - c*f)*(a + b*x)^(1 - n)*(e + f*x)^n)/(f*(b*e - a*f)*n) + ((b*(c*f - d*e*(
1 - n)) - a*d*f*n)*(-((f*(a + b*x))/(b*e - a*f)))^n*(e + f*x)^(1 + n)*Hypergeome
tric2F1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(f^2*(b*e - a*f)*n*(1 + n)*
(a + b*x)^n)

_______________________________________________________________________________________

Rubi [A]  time = 0.236443, antiderivative size = 150, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125 \[ \frac{(a+b x)^{-n} (e+f x)^{n+1} \left (-\frac{f (a+b x)}{b e-a f}\right )^n (-a d f n+b c f-b d e (1-n)) \, _2F_1\left (n,n+1;n+2;\frac{b (e+f x)}{b e-a f}\right )}{f^2 n (n+1) (b e-a f)}+\frac{(a+b x)^{1-n} (d e-c f) (e+f x)^n}{f n (b e-a f)} \]

Antiderivative was successfully verified.

[In]  Int[((c + d*x)*(e + f*x)^(-1 + n))/(a + b*x)^n,x]

[Out]

((d*e - c*f)*(a + b*x)^(1 - n)*(e + f*x)^n)/(f*(b*e - a*f)*n) + ((b*c*f - b*d*e*
(1 - n) - a*d*f*n)*(-((f*(a + b*x))/(b*e - a*f)))^n*(e + f*x)^(1 + n)*Hypergeome
tric2F1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)])/(f^2*(b*e - a*f)*n*(1 + n)*
(a + b*x)^n)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 27.5053, size = 116, normalized size = 0.77 \[ \frac{\left (a + b x\right )^{- n + 1} \left (e + f x\right )^{n} \left (c f - d e\right )}{f n \left (a f - b e\right )} + \frac{\left (\frac{f \left (a + b x\right )}{a f - b e}\right )^{n} \left (a + b x\right )^{- n} \left (e + f x\right )^{n + 1} \left (- b c f + d \left (a f n + b e \left (- n + 1\right )\right )\right ){{}_{2}F_{1}\left (\begin{matrix} n, n + 1 \\ n + 2 \end{matrix}\middle |{\frac{b \left (- e - f x\right )}{a f - b e}} \right )}}{f^{2} n \left (n + 1\right ) \left (a f - b e\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((d*x+c)*(f*x+e)**(-1+n)/((b*x+a)**n),x)

[Out]

(a + b*x)**(-n + 1)*(e + f*x)**n*(c*f - d*e)/(f*n*(a*f - b*e)) + (f*(a + b*x)/(a
*f - b*e))**n*(a + b*x)**(-n)*(e + f*x)**(n + 1)*(-b*c*f + d*(a*f*n + b*e*(-n +
1)))*hyper((n, n + 1), (n + 2,), b*(-e - f*x)/(a*f - b*e))/(f**2*n*(n + 1)*(a*f
- b*e))

_______________________________________________________________________________________

Mathematica [A]  time = 0.174802, size = 117, normalized size = 0.77 \[ \frac{(a+b x)^{-n} (e+f x)^n \left (\frac{f (a+b x)}{a f-b e}\right )^n \left (d n (e+f x) \, _2F_1\left (n,n+1;n+2;\frac{b (e+f x)}{b e-a f}\right )-(n+1) (d e-c f) \, _2F_1\left (n,n;n+1;\frac{b (e+f x)}{b e-a f}\right )\right )}{f^2 n (n+1)} \]

Antiderivative was successfully verified.

[In]  Integrate[((c + d*x)*(e + f*x)^(-1 + n))/(a + b*x)^n,x]

[Out]

(((f*(a + b*x))/(-(b*e) + a*f))^n*(e + f*x)^n*(-((d*e - c*f)*(1 + n)*Hypergeomet
ric2F1[n, n, 1 + n, (b*(e + f*x))/(b*e - a*f)]) + d*n*(e + f*x)*Hypergeometric2F
1[n, 1 + n, 2 + n, (b*(e + f*x))/(b*e - a*f)]))/(f^2*n*(1 + n)*(a + b*x)^n)

_______________________________________________________________________________________

Maple [F]  time = 0.079, size = 0, normalized size = 0. \[ \int{\frac{ \left ( dx+c \right ) \left ( fx+e \right ) ^{-1+n}}{ \left ( bx+a \right ) ^{n}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((d*x+c)*(f*x+e)^(-1+n)/((b*x+a)^n),x)

[Out]

int((d*x+c)*(f*x+e)^(-1+n)/((b*x+a)^n),x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int{\left (d x + c\right )}{\left (b x + a\right )}^{-n}{\left (f x + e\right )}^{n - 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x + c)*(f*x + e)^(n - 1)/(b*x + a)^n,x, algorithm="maxima")

[Out]

integrate((d*x + c)*(b*x + a)^(-n)*(f*x + e)^(n - 1), x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (d x + c\right )}{\left (f x + e\right )}^{n - 1}}{{\left (b x + a\right )}^{n}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x + c)*(f*x + e)^(n - 1)/(b*x + a)^n,x, algorithm="fricas")

[Out]

integral((d*x + c)*(f*x + e)^(n - 1)/(b*x + a)^n, x)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x+c)*(f*x+e)**(-1+n)/((b*x+a)**n),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (d x + c\right )}{\left (f x + e\right )}^{n - 1}}{{\left (b x + a\right )}^{n}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x + c)*(f*x + e)^(n - 1)/(b*x + a)^n,x, algorithm="giac")

[Out]

integrate((d*x + c)*(f*x + e)^(n - 1)/(b*x + a)^n, x)